package com.briup.pts.web.controller;

import com.briup.pts.config.response.Result;
import com.briup.pts.domain.vo.HurdlesVO;
import com.briup.pts.service.HurdlesService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hurdles")
@RequiredArgsConstructor
public class HurdlesController {

    private final HurdlesService service;

    @GetMapping("/selectAllHurdles")
    public Result<?> queryAll(){
        List<HurdlesVO> list = service.queryAll();
        return Result.success(list);
    }
}
